import axios from "../config.js";

/**
 * 分页查询收藏夹
 * @returns {Promise<unknown>}
 */
export const findPage = data => {
  return axios({
    url: "/favorite/findPage",
    method: "get",
    params: data
  });
};

/**
 * 删除收藏夹
 * @param data
 * @returns {Promise | Promise<unknown>}
 */
export const delUser = data => {
  return axios({
    url: "/favorite/delete/" + data,
    method: "delete"
  });
};

/**
 * 删除选中收藏夹
 * @param data
 * @returns {Promise | Promise<unknown>}
 */
export const delMore = data => {
  return axios({
    url: "/favorite/deleteMore?ids=" + data,
    method: "delete"
  });
};
